<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/


//后台
Route::get('/', function () {
    return view('welcome');
});


Route::get('admin', 'Admin\AdminController@index');



Route::match(['post','get'],'admin/login', 'Admin\LoginController@login');
//公共的模板
Route::get('admin/index', 'Admin\IndexController@index');
Route::get('admin/top', 'Admin\IndexController@top');
Route::get('admin/menu', 'Admin\IndexController@menu');
Route::get('admin/main', 'Admin\IndexController@main');

//属性
Route::get('admin/att_add', 'Admin\AttributeController@att_add');
Route::get('admin/att_list', 'Admin\AttributeController@att_list');

//品牌
Route::get('admin/brand_add', 'Admin\BrandController@brand_add');
Route::get('admin/brand_list', 'Admin\BrandController@brand_list');
Route::get('admin/brand_edit', 'Admin\BrandController@brand_edit');


//分类
Route::get('admin/cat_add', 'Admin\CatController@cat_add');
Route::get('admin/cat_list', 'Admin\CatController@cat_list');
Route::get('admin/cat_edit', 'Admin\CatController@cat_edit');
//商品
Route::get('admin/goods_add', 'Admin\GoodsController@goods_add');
Route::get('admin/goods_list', 'Admin\GoodsController@goods_list');
Route::get('admin/goods_edit', 'Admin\GoodsController@goods_edit');
Route::get('admin/goods_type_add', 'Admin\GoodsController@goods_type_add');
Route::get('admin/goods_type_list', 'Admin\GoodsController@goods_type_list');
Route::get('admin/goods_type_edit', 'Admin\GoodsController@goods_type_edit');




//前台
Route::get('/',"Home\IndexController@index");
Route::get('index',"Home\IndexController@index");

Route::get('search',"Home\IndexController@search");
Route::get('kuaibao','Home\IndexController@kuaibao');
Route::get('kbxq','Home\IndexController@kbxq');

// 分类
Route::get('type',"Home\IndexController@type");
Route::get('type_content',"Home\IndexController@type_content");

//前台供货商
//供货商
Route::get('supplies',"Home\SuppliesController@supplies");
Route::get('supplies_content/{id}',"Home\SuppliesController@supplies_content");
Route::get('supplies_goods/{id}',"Home\SuppliesController@supplies_goods");
Route::get('supplies_active/{id}',"Home\SuppliesController@supplies_active");
Route::get('supplies_active_detail/{id}',"Home\SuppliesController@supplies_active_detail");
Route::get('supplies_picture/{id}',"Home\SuppliesController@supplies_picture");
Route::get('supplies_tell/{id}',"Home\SuppliesController@supplies_tell");


// Route::get('supplies_picture',"Home\SuppliesController@supplies_picture");
// Route::get('supplies_tell',"Home\SuppliesController@supplies_tell");
// Route::get('supplies_active_detail',"Home\SuppliesController@supplies_active_detail");
// 后台供货商

Route::get('dian',"Admin\SupplierController@dian");
Route::get('/admin/goods_add',"Admin\SupplierController@goods_add");
Route::post('/admin/addPost',"Admin\SupplierController@addPost");
Route::get('/admin/dian',"Admin\SupplierController@dian");
Route::get('/admin/dianAdd',"Admin\SupplierController@dianAdd");
Route::post('/admin/dianAddPost',"Admin\SupplierController@dianAddPost");
Route::get('admin/goods_lists',"Admin\SupplierController@goods_lists");
Route::get('admin/activeAdd/{id}',"Admin\SupplierController@activeAdd");
Route::post('admin/activeAddPost',"Admin\SupplierController@activeAddPost");
Route::get('admin/activeDel/{id}','Admin\SupplierController@activeDel');
Route::get('admin/supplier_pictureAdd',"Admin\SupplierController@supplier_pictureAdd");
Route::post('admin/supplier_picturePost',"Admin\SupplierController@supplier_picturePost");
Route::post('admin/supplier_pictureDel/{id}',"Admin\SupplierController@supplier_pictureDel");
Route::get('admin/supplier_picture',"Admin\SupplierController@supplier_picture");
Route::get('admin/active_lists',"Admin\SupplierController@active_lists");
Route::get('admin/del/{id}','Admin\SupplierController@del');
Route::get('admin/dian_del/{id}','Admin\SupplierController@dian_del');
Route::match(['post','get'],'admin/goods_up/{id}','Admin\SupplierController@goods_up');
Route::match(['post','get'],'admin/dianUp/{id}','Admin\SupplierController@dianUp');
Route::match(['post','get'],'admin/activeUp/{id}','Admin\SupplierController@activeUp');
Route::get('activity',"Admin\SupplierController@activity");
//商品属性
Route::get('admin/shuAdd/{id}',"Admin\SupplierController@shuAdd");
Route::post('/admin/shuAddPost',"Admin\SupplierController@shuAddPost");
Route::get('admin/shu',"Admin\SupplierController@shu");
Route::get('admin/shuDel/{id}','Admin\SupplierController@shuDel');
//购物车
Route::get('car',"Home\CarController@car");

//个人中心
Route::get('user',"Home\UserController@user");